﻿using System;
using System.Collections.Generic;
using System.Threading;
using NUnit;
using NUnit.Framework;
using Rhino.Mocks;
using System.Globalization;
using System.Resources;


namespace mForum.Core.Tests.Infrastructure.Resource
{
    using mForum.Resources;
    using mForum.Core.Infrastructure.Resource;

    [TestFixture]
    public class ResourceHelperTest
    {
        private ResourceManager _resourceManager;
        private ResourceManagerFactory _resourceManagerFactory;

        [SetUp]
        public void Setup()
        {
            _resourceManagerFactory = new ResourceManagerFactory();
            _resourceManager = _resourceManagerFactory.CreateResourceManager();

            ResourceHelper.Initialize(_resourceManager);
        }

        [Test]
        public void can_retrive_message_by_key()
        {
            string expectedResult = "User does not exists";

            string result = ResourceHelper.GetErrorMessage(ResourceKey.User.UserDoesNotExists);

            Assert.AreEqual(expectedResult, result);
        }
    }
}
